<%-- 
    Document   : imoveis_detalhes
    Created on : Sep 22, 2013, 8:54:23 PM
    Author     : Fabio
--%>

<%@page import="model.Usuario"%>
<%@page import="model.Imovel"%>
<%@page import="model.BD_Sistema"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Detalhes do imovel</title>
    </head>
    <body>
    <center>
        <%
            int id_imovel = Integer.parseInt(request.getParameter("id"));
            BD_Sistema bds = BD_Sistema.getInstance();

            Imovel i = bds.buscaImovel(id_imovel);
            Usuario u = bds.donoImovel(id_imovel);

        %>
        <table>
            <tr>
                <td colspan="2"><b>Imovel:</b></td>
            </tr>
            <tr>
                <td>Categoria:</td><td> <% out.print(i.getCategoria());%> </td>
            </tr>
            <tr>
                <td>Tipo: </td><td><% out.print(i.getTipo());%></td>
            </tr>
            <tr>
                <td>Endereco: </td><td><% out.print(i.getLogradouro());%> </td>
            </tr>
            <tr>
                <td>
                    Bairro:</td><td> <% out.print(i.getBairro());%> </td>
            </tr>
            <tr>
                <td>Cidade:</td><td> <% out.print(i.getCidade());%> </td>
            </tr>
            <tr>
                <td>Estado:</td><td> <% out.print(i.getEstado());%></td>
            </tr>
            <tr>
                <td>Numero de quartos:</td><td><% out.print(i.getNroQuartos());%></td>
            </tr>
            <tr>
                <td>Numero de banheiros:</td><td><% out.print(i.getNroBanheiros());%> </td>
            </tr>
            <tr>
                <td>Descricao:</td><td><% out.print(i.getDescricao());%> </td>
            </tr>
            <tr>
                <td>Valor:</td><td><% out.print(i.getValor());%></td>
            </tr>
            <tr>
                <td colspan="2"><b>Proprietario:</b></td>
            </tr>
            <tr>
                <td>Nome:</td><td><% out.print(u.getNome());%></td>
            </tr>
            <tr>
                <td>Telefone:</td><td><% out.print(u.getTelefone());%></td>
            </tr>
        </table>
            <a href="home.jsp"> Voltar</a>
            
    </center>
</body>
</html>

